<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <script src="vue.js"></script>
    <link rel="stylesheet" type="text/css" href="animate.css" />
  </head>
  <body>
    <div id="root">
      <transition
        name="fade"
        enter-active-class="animated tada"
        leave-active-class="animated wobble"
      >
        <div v-show="show">hello wrold</div>
      </transition>
      <button @click="handleBtnClick">按钮</button>
    </div>
    <script>
      var vim = new Vue({
        el: '#root',
        data: {
          show: true
        },
        methods: {
          handleBtnClick: function() {
            this.show = !this.show;
          }
        }
      });
    </script>
    <!-- 显示阶段执行流程  被transition包裹的元素的动画执行过程，在第一桢首先会引用name值-enter、name值-enter-active样式，
         到第二桢会移除name值-enter，引用name值-enter-to样式，执行到最后一桢移除name值-enter-active、name值-enter-to样式 
    -->

    <!-- 隐藏阶段执行流程  被transition包裹的元素的动画执行过程，在第一桢首先会引用name值-leave、name值-leave-active样式，
         到第二桢会移除name值-leave，引用name值-leave-to样式，执行到最后一桢移除name值-leave-active、name值-leave-to样式 
    -->
  </body>
</html>
